import request from '@/utils/request'
import {encodeParams} from '@/utils'

//分页列表
export function getPageList(data) {
  return request({
    url: '/api/productBrand?${encodeParams(data)}',
    method: 'POST',
    data
  })
}

//列表
export function getBrandlist(data) {
  return request({
    url: '/api/productBrand/list',
    method: 'POST',
    data
  })
}
//创建
export function create(data) {
  return request({
    url: '/api/productBrand/create',
    method: 'POST',
    data
  })
}


//根据id查询
export function getById(id) {
  return request({
    url: `/api/productBrand/get/${id}`,
    method: 'GET',
  })
}

//更新
export function update(data) {
  return request({
    url: '/api/productBrand/update',
    method: 'POST',
    data
  })
}
//启用禁用
export function changeEnable(id, enable) {
  return request({
    url: `/api/productBrand/enable/${id}/${enable}`,
    method: 'GET',
  })
}

